package com.jg.poiet;

import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.*;

/**
 * 对原生poi的扩展
 */
public class NiceXSSFWorkbook extends AbstractNiceWorkbook{
    final static Logger logger = LoggerFactory.getLogger(NiceXSSFWorkbook.class);

    /**
     * 新建空白工作簿
     */
    public NiceXSSFWorkbook() {
        super(new XSSFWorkbook());
    }

    /**
     * 通过流的形式打开一个工作簿
     * @param in    excel流
     * @throws IOException
     */
    public NiceXSSFWorkbook(InputStream in) throws IOException {
        super(new XSSFWorkbook(in));
        buildAllCellRangeAddress();
    }
}
